<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditProvaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditProvaLabel_provaId}" for="provaId" />
                    <h:inputText id="provaId" value="#{provaController.selected.provaId}" title="#{bundle.EditProvaTitle_provaId}" required="true" requiredMessage="#{bundle.EditProvaRequiredMessage_provaId}"/>
                    <h:outputLabel value="#{bundle.EditProvaLabel_titulo}" for="titulo" />
                    <h:inputText id="titulo" value="#{provaController.selected.titulo}" title="#{bundle.EditProvaTitle_titulo}" required="true" requiredMessage="#{bundle.EditProvaRequiredMessage_titulo}"/>
                    <h:outputLabel value="#{bundle.EditProvaLabel_descricao}" for="descricao" />
                    <h:inputText id="descricao" value="#{provaController.selected.descricao}" title="#{bundle.EditProvaTitle_descricao}" />
                    <h:outputLabel value="#{bundle.EditProvaLabel_tempolimite}" for="tempolimite" />
                    <h:inputText id="tempolimite" value="#{provaController.selected.tempolimite}" title="#{bundle.EditProvaTitle_tempolimite}" >
                        <f:convertDateTime pattern="HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditProvaLabel_disponivelapartide}" for="disponivelapartide" />
                    <h:inputText id="disponivelapartide" value="#{provaController.selected.disponivelapartide}" title="#{bundle.EditProvaTitle_disponivelapartide}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditProvaLabel_disponivellate}" for="disponivellate" />
                    <h:inputText id="disponivellate" value="#{provaController.selected.disponivellate}" title="#{bundle.EditProvaTitle_disponivellate}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditProvaLabel_qtdQuestoes}" for="qtdQuestoes" />
                    <h:inputText id="qtdQuestoes" value="#{provaController.selected.qtdQuestoes}" title="#{bundle.EditProvaTitle_qtdQuestoes}" />
                    <h:outputLabel value="#{bundle.EditProvaLabel_notamaxima}" for="notamaxima" />
                    <h:inputText id="notamaxima" value="#{provaController.selected.notamaxima}" title="#{bundle.EditProvaTitle_notamaxima}" />
                    <h:outputLabel value="#{bundle.EditProvaLabel_autorUsuarioId}" for="autorUsuarioId" />
                    <h:selectOneMenu id="autorUsuarioId" value="#{provaController.selected.autorUsuarioId}" title="#{bundle.EditProvaTitle_autorUsuarioId}" required="true" requiredMessage="#{bundle.EditProvaRequiredMessage_autorUsuarioId}">
                        <f:selectItems value="#{usuarioController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{provaController.update}" value="#{bundle.EditProvaSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditProvaViewLink}"/>
                <br />
                <h:commandLink action="#{provaController.prepareList}" value="#{bundle.EditProvaShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditProvaIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
